package com.maxd.modules.coupon.utils;

import com.maxd.modules.coupon.entity.CouponAmount;

/**
 * @Auther: Laban:yubo_010@163.com
 * @Date: 2020/11/13 15:04
 * @Description:
 */
public class CouponAmountUtil {

    /**
     * ""转null
     */
    public CouponAmount copyNull(CouponAmount couponAmount){
        if("".equals(couponAmount.getUserId())){
            couponAmount.setUserId(null);
        }

        if("".equals(couponAmount.getUserDeductQuota())){
            couponAmount.setUserDeductQuota(null);
        }

        if("".equals(couponAmount.getUserProvinceAmount())){
            couponAmount.setUserProvinceAmount(null);
        }

        if("".equals(couponAmount.getUserFrozenAmount())){
            couponAmount.setUserFrozenAmount(null);
        }

        return  couponAmount;
    }
}
